#include "TragedyFactory.h"

GlassFacotry* GlassFacotry::_instance = nullptr;

CupFactory* CupFactory::_instance = nullptr;

GlassFacotry::GlassFacotry()
{

}

GlassFacotry* GlassFacotry::Instance()
{
	if (!_instance)
	{
		_instance = new GlassFacotry;
	}

	return _instance;
}

Tragedy* GlassFacotry::CreateTragedy()
{
	return new Glass;
}

CupFactory::CupFactory()
{

}

CupFactory* CupFactory::Instance()
{
	if (!_instance)
	{
		_instance = new CupFactory;
	}

	return _instance;
}

Tragedy* CupFactory::CreateTragedy()
{
	return new Cup;
}